-- UNITDEF -- pawnclose_i --
--------------------------------------------------------------------------------

local unitName = "pawnclose_i"

--------------------------------------------------------------------------------

local unitDef = {
  acceleration       = 0.75,
  brakeRate          = 0.75,
  buildCostMetal     = 60,
  canAttack          = true,
  canMove            = true,
  canstop            = 1,
  category           = [[PAWN UNARMORED UNIT TARGET SMALL]],
  collisionvolumetest = 1,
  corpse              = [[DEAD]],
  description        = [[Assault Lv 1]],
  energyMake         = 0,
  energyStorage      = 0,
  explodeAs          = [[Death]],
  footprintX         = 1,
  footprintZ         = 1,
  iconType           = [[pawn]],
  idleAutoHeal       = 10,
  idleTime           = 300,
  levelGround        = false,
  maxDamage          = 100, --200 regularly but half for double squad#
  maxVelocity        = 1.5,
  metalMake          = 0,
  metalStorage       = 0,
  movementClass      = [[small]],
  name               = [[Power Armor]],
  noChaseCategory    = [[NOTARGET AIR]],
  objectName         = [[pawnclose_i.s3o]],
  radarDistance      = 0,
  reclaimable        = false,
  seismicSignature   = 1,
  selfDestructAs     = [[Death]],
  selfDestructCountdown = 1,
  showNanoFrame      = false,
  sightDistance      = 800,
  smoothAnim         = false,
  turnRate           = 1500,
  unitname           = [[pawnclose_i]],
  upright            = true,
  sfxtypes = {
    explosiongenerators = {
	[[custom:flashmuzzle1]],
	[[custom:burning]],
    },
  },
  -- sounds = {
    -- arrived = {
      -- [[commandgiven]],
    -- },
    -- ok = {
      -- [[commandgiven]],
    -- },
    -- select = {
      -- [[select]],
    -- },
  -- },
  weapons = {
    [1]  = {
      def                = [[ciwep1]],
	onlyTargetCategory = [[TARGET]], -- this is to avoid targeting bad targets ie features or invincable units
	  mainDir = "0 0 1",
      maxAngleDif = 170,
    },
  },
}


--------------------------------------------------------------------------------

local weaponDefs = {
  ciwep1 = {
	name = [[Rocketlauncher]],
	id = 1,
	rendertype = 4,
	ballistic = 1,
	turret = 1,

	collideFriendly    = false, --for now
	energypershot = 0,
	range = 180,
	reloadtime = 6,  --normaly 3 but halfing damage
	weaponvelocity = 900,
	areaofeffect = 20,
	edgeeffectiveness = 1,
	model = [[srocket.s3o]],
	soundstart = [[rockfire2]],
	soundhit = [[rockhit2]],
	firestarter = 50,
	accuracy = 300,
	aimrate = 1000,
	tolerance = 300,
	holdtime = 1,
	explosiongenerator = [[custom:SMALLMISSILE_EXPLOSION]],
	startsmoke = 1,
	impulsefactor = 0,
	impulseBoost = 0,
	craterMult = 0,
	craterBoost = 0,
	InterceptedByShieldType = 2,

       damage = {
      default            = 40,
   		 },
  },


  }
unitDef.weaponDefs = weaponDefs


local featureDefs = {
    DEAD  = {
      description      = [[Wreckage - pawn]],
      blocking         = false,
      category         = [[corpses]],
      damage           = 1000,
      energy           = 0,
	  ---featureDead      = [[HEAP]],
      featurereclamate = [[SMUDGE01]],
      footprintX       = 1,
      footprintZ       = 1,
      height           = [[20]],
      hitdensity       = [[100]],
      metal            = 0,
      object           = [[pawnclose_i_dead.s3o]],
      reclaimable      = false,
      reclaimTime      = 0,
      world            = [[All Worlds]],
    },
	
  }
  unitDef.featureDefs = featureDefs
  
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------
